import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '@/App'
import Demo from '@/views/demo/index'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: Home,
        name: 'Home',
        children: [
            {
                path: 'demo',
                component: Demo,
                name: 'Demo',
                alias: ''
            },
        ],
    },
]

const router = new VueRouter({
    mode: 'hash',
    routes,
})

export default router
